package com.jh.user.pojo;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Date;

@Entity
@Table(name = "t_terminal_info")
public class TerminalInfo {
    private Long id;
    private Long userId;//userid
    private String shopId;//商户id
    private String shopName;//商户姓名
    private String terminalType;//终端类型0智能pos 1台卡
    private String terminalNo;//终端号
    private String storeName;//门店名字
    private String storeNo;//门店编号
    private String machineNo;//机器号
    private Integer machineType;//机器类型 0点佰趣
    private String simNo;//sim卡号
    private String terminalName;//终端简称
    private String shopLogo;//图片logo
    private String evmImg;//二维码图片地址
    private String payUrl;//支付地址
    private String evmNo;//二维码编号
    private Integer binding;//绑定状态 0绑定 1没绑定
    private Integer status;//开通状态0开通1关闭
    private Date createTime;

    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Id
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "user_id")
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "shop_id")
    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    @Basic
    @Column(name = "shop_name")
    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    @Basic
    @Column(name = "terminal_type")
    public String getTerminalType() {
        return terminalType;
    }

    public void setTerminalType(String terminalType) {
        this.terminalType = terminalType;
    }

    @Basic
    @Column(name = "terminal_no")
    public String getTerminalNo() {
        return terminalNo;
    }

    public void setTerminalNo(String terminalNo) {
        this.terminalNo = terminalNo;
    }

    @Basic
    @Column(name = "store_name")
    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    @Basic
    @Column(name = "store_no")
    public String getStoreNo() {
        return storeNo;
    }

    public void setStoreNo(String storeNo) {
        this.storeNo = storeNo;
    }

    @Basic
    @Column(name = "machine_no")
    public String getMachineNo() {
        return machineNo;
    }

    public void setMachineNo(String machineNo) {
        this.machineNo = machineNo;
    }

    @Basic
    @Column(name = "machine_type")
    public Integer getMachineType() {
        return machineType;
    }

    public void setMachineType(Integer machineType) {
        this.machineType = machineType;
    }

    @Basic
    @Column(name = "sim_no")
    public String getSimNo() {
        return simNo;
    }

    public void setSimNo(String simNo) {
        this.simNo = simNo;
    }

    @Basic
    @Column(name = "terminal_name")
    public String getTerminalName() {
        return terminalName;
    }

    public void setTerminalName(String terminalName) {
        this.terminalName = terminalName;
    }

    @Basic
    @Column(name = "shop_logo")
    public String getShopLogo() {
        return shopLogo;
    }

    public void setShopLogo(String shopLogo) {
        this.shopLogo = shopLogo;
    }

    @Basic
    @Column(name = "evm_img")
    public String getEvmImg() {
        return evmImg;
    }

    public void setEvmImg(String evmImg) {
        this.evmImg = evmImg;
    }

    @Basic
    @Column(name = "pay_url")
    public String getPayUrl() {
        return payUrl;
    }

    public void setPayUrl(String payUrl) {
        this.payUrl = payUrl;
    }

    @Basic
    @Column(name = "evm_no")
    public String getEvmNo() {
        return evmNo;
    }

    public void setEvmNo(String evmNo) {
        this.evmNo = evmNo;
    }

    @Basic
    @Column(name = "binding")
    public Integer getBinding() {
        return binding;
    }

    public void setBinding(Integer binding) {
        this.binding = binding;
    }

    @Basic
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public boolean equalsPos(TerminalInfo o) {
        if (o == null || getClass() != o.getClass()) return false;
        if (o.getTerminalName() == null||"".equals(o.getTerminalName() )) return false;
        if (o.getTerminalType() == null||"".equals(o.getTerminalType() )) return false;
        if (o.getMachineNo() == null||"".equals(o.getMachineNo() )) return false;
        if (o.getMachineType() == null||"".equals(o.getMachineType() )) return false;
        if (o.getSimNo() == null||"".equals(o.getSimNo() )) return false;
        return true;
    }

    public boolean equalsTaiKa(TerminalInfo o) {
        if (o == null || getClass() != o.getClass()) return false;

        if (o.getTerminalName() == null||"".equals(o.getTerminalName() )) return false;
        if(o.getEvmNo()== null||"".equals(o.getEvmNo() )) return false;
        if (o.getShopLogo() == null||"".equals(o.getShopLogo() )) return false;
        if (o.getEvmImg() == null||"".equals(o.getEvmImg() )) return false;
        if (o.getPayUrl() == null||"".equals(o.getPayUrl() )) return false;
        return true;
    }


}
